package logic

import (
	"context"

	"work-safety/api/internal/svc"
	"work-safety/api/internal/types"

	"github.com/zeromicro/go-zero/core/logx"
)

type LoginLogic struct {
	logx.Logger
	ctx    context.Context
	svcCtx *svc.ServiceContext
}

func NewLoginLogic(ctx context.Context, svcCtx *svc.ServiceContext) *LoginLogic {
	return &LoginLogic{
		Logger: logx.WithContext(ctx),
		ctx:    ctx,
		svcCtx: svcCtx,
	}
}

func (l *LoginLogic) Login(req *types.LoginRequest) (resp *types.Response, err error) {
	// todo: add your logic here and delete this line
	//	data, err := l.svcCtx.WorkRpc.Login(l.ctx,,workrpc.LoginRequest{
	//	Account:  req.Account,
	//	Password: req.Password,
	//})
	//	if err != nil {
	//		return &types.Response{
	//			Message: err.Error(),
	//			Code:    500,
	//			Data:    nil,
	//		},nil
	//
	//	}
	//	return &types.Response{
	//		Message: "登陆成功",
	//		Code:    200,
	//		Data:    data,
	//	},nil
	return
}
